from django.db import models
from django.conf import settings
import datetime
from StartGroup.models import Group
from contifyuser.models import Member

class Discussion(models.Model):
    group = models.ForeignKey(Group, to_field='group_web_address', unique=False)
    topic = models.CharField(max_length=50)
    topic_desc = models.CharField(max_length=500)
    post_date = models.DateTimeField(auto_now_add = True)
    post_by = models.CharField(max_length=40)
    last_update_dt = models.DateTimeField(auto_now_add = True)
    last_post_by = models.CharField(max_length=40)
    photo = models.CharField(max_length=100)
    
class Disc_Comment(models.Model):
    discussion = models.ForeignKey(Discussion, unique=False)
    photo = models.CharField(max_length=100)
    comment = models.CharField(max_length=200)
    post_date = models.DateTimeField(auto_now_add = True)
    post_by = models.CharField(max_length=40)